import { AxiosPromise } from 'axios';
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';

// 创建 axios 实例
const service = axios.create({
	timeout: 50000,
	withCredentials: true, // send cookies when cross-domain requests
	//headers: { 'Content-Type': 'application/json;charset=utf-8' }
}); 

export function ajax_request(url: string) {	
  return service.request({
    url: '/codegen/ajax_request.html',
    method:'post',
    data:{url}
  });
}